﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Atom.NetFrame
{
    /// <summary>
    /// 转发中心虚类
    /// </summary>
    public abstract class AbsHandleCenter
    {
        /// <summary>
        /// 客户端链接
        /// </summary>
        /// <param name="ut">链接的客户端</param>
        public abstract void ClientConnect(UserToken ut);

        /// <summary>
        /// 消息接受
        /// </summary>
        /// <param name="ut">接受消息的客户端</param>
        /// <param name="message">消息内容</param>
        public abstract void MessageReceive(UserToken ut, object message);

        /// <summary>
        /// 客户端断开链接
        /// </summary>
        /// <param name="ut">断开链接的客户端</param>
        /// <param name="error">断开链接的原因</param>
        public abstract void ClientClose(UserToken ut, string error);
    }
}
